package com.fzn.springboot_jsp_shiro.dao;

import com.fzn.springboot_jsp_shiro.entity.Perms;
import com.fzn.springboot_jsp_shiro.entity.Role;
import com.fzn.springboot_jsp_shiro.entity.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author fzn
 * @date 2022/3/19
 * @apiNote
 */
@Mapper
public interface UserDao {

    void save(User user);

    User findByUserName(String username);

    // 根据用户名查询角色
    User findRoleByUserName(String username);

    // 根据角色id 查询权限集合
    List<Perms> findPermsByRoleId(String id);
}
